import ButtonPlus from "./Common/Components/ButtonPlus";
import TipsManager from "./UIFrame/TipsManager";
import TouchPlus from "./Common/Components/TouchPlus";
import { EventCenter } from "./UIFrame/EventCenter";
import DebugWindowUtil from "./Common/Utils/DebugWindowUtils";
import UITitle from "./UICtrl/UITitle";

const { ccclass, property } = cc._decorator;

@ccclass
export default class Main extends cc.Component {

    @property(ButtonPlus)
    buttonPlus: ButtonPlus = null;

    @property(TouchPlus)
    touchPlus: TouchPlus = null;

    onLoad() {
        EventCenter.on("Event_Login", (a: number, b: number, c: number) => {
            console.log("Event ", a, b, c);
        }, this);
    }

    start() {
        if (CC_DEBUG) {
            DebugWindowUtil.init();
        }
        TipsManager.getInstance().setLoadingForm("UIForm/UITitle");
        UITitle.openView(1, 2, 3)
    }

    /**
     * 
     */
    onDestroy() {
        cc.log('destory');
    }
}
